<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="common/common::common('表设置')"/>
    <script th:src="@{/static/dev/way.js}" charset="utf-8"></script>
    <script th:src="@{/static/dev/edit.js}" charset="utf-8"></script>

    <style>
        .layui-form-item .layui-input-inline {
            width: 300px;
        }

        .layui-form-label {
            width: 130px;
        }

        .layui-input-block {
            margin-left: 160px;
        }

    </style>

</head>
<body class="bg-color">


<div class="layui-fluid">
    <div class="layui-row layui-col-space15">
        <div class="layui-col-md12" style="background-color: #FFF; margin-top: 15px">
            <div class="layui-card">
<!--                <div class="layui-card-header">编辑表信息</div>-->
                <div class="layui-card-body" pad15>
                    <form class="layui-form" id="editTableInfoForm">
                        <input type="text" th:value="*{id}" id="id" name="id" style="display: none">
                        <div class="layui-tab layui-tab-brief">
                            <ul class="layui-tab-title">
                                <li class="layui-this">表设置</li>
                                <li>字段设置</li>
                            </ul>
                            <div class="layui-tab-content">
                                <div class="layui-tab-item layui-show">
                                    <div class="layui-form-body">


                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>表名称
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="tableName" name="tableName"
                                                           readonly="readonly"
                                                           lay-verify="required" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>功能名
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="funcName" name="funcName"
                                                           lay-verify="required" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>实体类名称
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="clazzName" name="clazzName"
                                                           lay-verify="required" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>开发者姓名
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="funcAuthor" name="funcAuthor"
                                                           lay-verify="required" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    上级菜单ID
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="menuId" name="menuId"
                                                           autocomplete="off" class="layui-input">
                                                </div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    应用ID/appId
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="appId" name="appId"
                                                           autocomplete="off" class="layui-input">
                                                </div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    服务上下文
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="contextPath" name="contextPath"
                                                           autocomplete="off" class="layui-input">
                                                </div>
                                            </div>



                                        </div>


                                        <fieldset class="layui-elem-field layui-field-title">
                                            <legend>后端</legend>
                                        </fieldset>

                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>包基础路径
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="rearPackage" name="rearPackage"
                                                           lay-verify="required" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>模块名(路径)
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="moduleName" name="moduleName"
                                                           lay-verify="required" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>前后端分离
                                                </label>
                                                <div class="layui-input-inline" id="rearSplitBlock">
                                                </div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>使用DTO/VO模型
                                                </label>
                                                <div class="layui-input-inline" id="rearDddBlock">
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>后端模板
                                                </label>
                                                <div class="layui-input-inline" id="rearTempBlock">
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>Controller 地址
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="rearUri" name="rearUri"
                                                           lay-verify="required" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>

<!--                                            <div class="layui-inline">-->
<!--                                                <label class="layui-form-label">-->
<!--                                                    <span class="required">*</span>是否使用 Lombok-->
<!--                                                </label>-->
<!--                                                <div class="layui-input-inline">-->
<!--                                                    <div class="layui-input-inline" id="useLombokBlock">-->
<!--                                                    </div>-->
<!--                                                </div>-->
<!--                                            </div>-->

<!--                                            <div class="layui-inline">-->
<!--                                                <label class="layui-form-label">-->
<!--                                                    <span class="required">*</span>是否使用 Swagger-->
<!--                                                </label>-->
<!--                                                <div class="layui-input-inline">-->
<!--                                                    <div class="layui-input-inline" id="useSwaggerBlock">-->
<!--                                                    </div>-->
<!--                                                </div>-->
<!--                                            </div>-->

                                        </div>


                                        <fieldset class="layui-elem-field layui-field-title">
                                            <legend>构建者模式</legend>
                                        </fieldset>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>实体类
                                                </label>
                                                <div class="layui-input-inline" id="buildEntityBlock"></div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>查询类
                                                </label>
                                                <div class="layui-input-inline" id="buildQueryBlock"></div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>DTO
                                                </label>
                                                <div class="layui-input-inline" id="buildDtoBlock"></div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>VO
                                                </label>
                                                <div class="layui-input-inline" id="buildVoBlock"></div>
                                            </div>

                                        </div>

                                        <fieldset class="layui-elem-field layui-field-title">
                                            <legend>前端</legend>
                                        </fieldset>
                                        <div class="layui-form-item">
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>前端包路径
                                                </label>
                                                <div class="layui-input-inline">
                                                    <input type="text" id="frontPackage" name="frontPackage"
                                                           lay-verify="required" autocomplete="off" class="layui-input">
                                                </div>
                                            </div>
                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>UI类型
                                                </label>
                                                <div class="layui-input-inline">
                                                    <select name="frontUiStyle" id="frontUiStyle"></select>
                                                </div>
                                            </div>

                                            <div class="layui-inline">
                                                <label class="layui-form-label">
                                                    <span class="required">*</span>浏览器打开方式
                                                </label>
                                                <div class="layui-input-inline">
                                                    <select name="iframe" id="iframe"></select>
                                                </div>
                                            </div>
                                        </div>


                                        <div class="layui-form-item">
                                            <label class="layui-form-label">
                                                备注
                                            </label>
                                            <div class="layui-input-block">
                                                <textarea id="remarks" name="remarks" maxlength="30" class="layui-textarea"></textarea>
                                            </div>
                                        </div>
                                    </div>
                                </div>

                                <div class="layui-tab-item">
                                    <div class="layui_table">
                                        <table class="layui-hide" id="layTable" lay-filter="layTableFilter"></table>
                                    </div>
                                </div>
                            </div>
                        </div>


                        <div style="text-align:center;margin-top: 20px;margin-bottom: 30px;">
                            <button type="button" class="layui-btn query-handle-button" id="saveTableInfo"
                                    lay-submit lay-filter="editTableInfo">
                                <i class="layui-icon layui-icon-release" style="margin-right: 5px"></i>提 交
                            </button>
                            <button type="button" class="layui-btn query-handle-button flyer-close ">
                                <i class="layui-icon layui-icon-close" style="margin-right: 5px"></i>关 闭
                            </button>
                        </div>
                    </form>
                </div>
            </div>

        </div>
    </div>
</div>

<!-- 是否主键 -->
<script type="text/html" id="isPkTpl">
    <input type="checkbox" name="isPk" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isPkFilter" {{ d.isPk== 1 ? 'checked' : '' }}>
</script>

<!-- 是否Dto字段 -->
<script type="text/html" id="isDtoTpl">
    <input type="checkbox" name="isDto" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isDtoFilter" {{ d.isDto== 1 ? 'checked' : '' }}>
</script>

<!-- 是否Vo字段 -->
<script type="text/html" id="isVoTpl">
    <input type="checkbox" name="isVo" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isVoFilter" {{ d.isVo== 1 ? 'checked' : '' }}>
</script>

<!-- 是否表单字段 -->
<script type="text/html" id="isFormTpl">
    <input type="checkbox" name="isForm" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isFormFilter" {{ d.isForm== 1 ? 'checked' : '' }}>
</script>

<!-- 是否必填 -->
<script type="text/html" id="isRequiredTpl">
    <input type="checkbox" name="isRequired" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isRequiredFilter" {{ d.isRequired== 1 ? 'checked' : '' }}>
</script>

<!-- 是否列表字段 -->
<script type="text/html" id="isListTpl">
    <input type="checkbox" name="isList" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isListFilter" {{ d.isList== 1 ? 'checked' : '' }}>
</script>

<!-- 是否导出字段 -->
<script type="text/html" id="isExpTpl">
    <input type="checkbox" name="isExp" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isExpFilter" {{ d.isExp== 1 ? 'checked' : '' }}>
</script>

<!-- 是否查询字段 -->
<script type="text/html" id="isQueryTpl">
    <input type="checkbox" name="isQuery" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isQueryFilter" {{ d.isQuery== 1 ? 'checked' : '' }}>
</script>

<!-- 是否使用 -->
<script type="text/html" id="isUsableTpl">
    <input type="checkbox" name="isUsable" value="{{d.columnId}}" lay-skin="switch" lay-text="是|否"
           lay-filter="isUsableFilter" {{ d.isUsable== 1 ? 'checked' : '' }}>
</script>


<!-- java 类型 -->
<script type="text/html" id="TPL-dropdpwn-java-type">
    <button class="layui-btn layui-btn-primary dropdpwn-java-type">
        <span>{{= d.javaTypeTitle || 'String' }}</span>
        <i class="layui-icon layui-icon-down layui-font-12"></i>
    </button>
</script>

<!-- 查询方式 -->
<script type="text/html" id="TPL-dropdpwn-query">
    <button class="layui-btn layui-btn-primary dropdpwn-query">
        <span>{{= d.queryTitle || '=' }}</span>
        <i class="layui-icon layui-icon-down layui-font-12"></i>
    </button>
</script>

<!-- 显示类型 -->
<script type="text/html" id="TPL-dropdpwn-html-type">
    <button class="layui-btn layui-btn-primary dropdpwn-html-type">
        <span>{{= d.htmlTitle || '文本框' }}</span>
        <i class="layui-icon layui-icon-down layui-font-12"></i>
    </button>
</script>

<!-- 显示类型 -->
<script type="text/html" id="TPL-dropdpwn-dict-data">
    <button class="layui-btn layui-btn-primary dropdpwn-dict-data">
        <span>{{= d.dictTitle || '是与否' }}</span>
        <i class="layui-icon layui-icon-down layui-font-12"></i>
    </button>
</script>

</body>
</html>